<div id="myCarousel" class="carousel slide clearfix" >
    <ol class="carousel-indicators">
        {% for carousel_page in carousel_page_list %}
            {% if forloop.first%}
                <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
            {% else %}
                <li data-target="#myCarousel" data-slide-to="{{forloop.counter0}}"></li>
            {% endif%}
            
        {% endfor %}
    </ol>   
    <!-- 轮播（Carousel）项目 -->
    <div class="carousel-inner">
        {% for carousel_page in carousel_page_list %}
            {% if forloop.first%}
            <div class="item active">
                <a href="/article/{{carousel_page.article.en_title}}.html">
                    <img src="{{carousel_page.img}}" alt="{{carousel_page.title}}">
                    <div class="carousel-caption">
                        <h4>{{carousel_page.title}}</h4>
                        {% autoescape off%}
                        {{carousel_page.summary}}
                        {% endautoescape %}
                    </div>
                </a>
            </div>
            {% else %}
            <div class="item">
                <a href="/article/{{carousel_page.article.en_title}}.html">
                    <img src="{{carousel_page.img}}" alt="{{carousel_page.title}}">
                    <div class="carousel-caption">
                        <h4>{{carousel_page.title}}</h4>
                        {% autoescape off%}
                        {{carousel_page.summary}}
                        {% endautoescape %}
                    </div>
                </a>
            </div>
            {% endif%}
        {% endfor %}
    </div>
    <!-- 轮播（Carousel）导航 -->
    <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
</div> 
